<?php /*a:2:{s:76:"D:\leruge_program\local\admin\application\admin\view\system\system_info.html";i:1592181449;s:71:"D:\leruge_program\local\admin\application\admin\view\common\__base.html";i:1592181449;}*/ ?>
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title></title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta http-equiv="Access-Control-Allow-Origin" content="*">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="format-detection" content="telephone=no">
    <link rel="stylesheet" href="/static/admin/lib/layui-v2.5.5/css/layui.css" media="all">
    <link rel="stylesheet" href="/static/admin/lib/font-awesome-4.7.0/css/font-awesome.min.css" media="all">
    <link rel="stylesheet" href="/static/admin/css/public.css" media="all">
    <!--[if lt IE 9]>
    <script src="https://cdn.staticfile.org/html5shiv/r29/html5.min.js"></script>
    <script src="https://cdn.staticfile.org/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->
    <style id="layuimini-bg-color">
    </style>
    
</head>
<body>
<div class="layuimini-container">
    <div class="layuimini-main">
        
<form class="layui-form layui-form-pane">
    <input type="hidden" name="id" value="<?php echo htmlentities($systemInfo['id']); ?>">
    <div class="layui-form-item">
        <label class="layui-form-label">网站名称</label>
        <div class="layui-input-block">
            <input type="text" class="layui-input" name="web_name" value="<?php echo htmlentities($systemInfo['web_name']); ?>" lay-verify="required" placeholder="网站名称">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">网站版权</label>
        <div class="layui-input-block">
            <input type="text" class="layui-input" name="copyright" value="<?php echo htmlentities($systemInfo['copyright']); ?>" lay-verify="required" placeholder="网站版权">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">LOGO</label>
        <div class="layui-input-block">
            <input type="hidden" id="logo" name="logo" value="<?php echo htmlentities($systemInfo['logo']); ?>" lay-verify="required">
            <img src="<?php echo htmlentities($systemInfo['logo']); ?>" id="logo_img" style="max-height: 100px;" alt="logo">
            <button class="layui-btn layui-btn-normal" type="button" id="upload_img">选择LOGO</button>
        </div>
    </div>
    <div class="layui-form-item">
        <div class="layui-input-block">
            <button class="layui-btn" lay-submit lay-filter="submit">设置</button>
        </div>
    </div>
</form>

    </div>
</div>

<script src="/static/admin/lib/layui-v2.5.5/layui.js" charset="utf-8"></script>
<script src="/static/admin/js/lay-config.js?v=2.0.0" charset="utf-8"></script>

<script>
    layui.use(['upload', 'form', 'jquery'], function () {
        let $ = layui.jquery;
        // 上传图片
        layui.upload.render({
            elem: "#upload_img",
            url: "<?php echo url('tool/tool/uploadImg'); ?>",
            done: function (res) {
                if (res.code == 1) {
                    $("#logo").val(res.data.url);
                    $("#logo_img").attr("src", res.data.url);
                }
            }
        });

        // 提交
        layui.form.on("submit(submit)", function (obj) {
            $.post("<?php echo url('admin/system/systemInfo'); ?>", $("form").serialize(), function (res) {
                layer.msg(res.msg);
            }, 'json');
            return false;
        });
    });
</script>

</body>
</html>
